<style type="text/css">
/*.fan 
{
  border-top-width:1px;
  margin-top:10px;
  overflow:hidden;
  padding-top:10px;
}
.fan_title
{
    font-size: 13px;
    font-weight: bold;
    padding-left: 60px;
}
.profile_friends_icon
{
    position: absolute;   
}
*/
.fan_ul
{
    display: block;
list-style-type: disc;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
-webkit-padding-start: 40px;
}

.fan_li
{
display: list-item;
text-align: -webkit-match-parent;
}

</style>

<?php
$viewer_id = $this->viewer->getIdentity();
?>

<ul class="fan_ul">
    <?php foreach ($this->fans as $fan): ?>

        <li class="fan_li">
            <?php
                  
                  $user = Engine_Api::_()->getItem('user', $fan->follower_id);
                  echo $this->htmlLink($user->getHref(), $this->itemPhoto($user, 'thumb.icon'), array('class' => 'profile_friends_icon'));
            ?>
            <div class="fan_title">
                  <?php echo $this->htmlLink($user->getHref(), $user->getTitle()) ?>
            </div>  
          
<div style="float:right">
           <?php
                $api = Engine_Api::_()->fan();
                if($this->viewer()->isSelf($user)){
                    
                }else if($api->isFan($user)){
                    //echo "I am fan..undo";
                    
//                      echo $this->htmlLink(
//                                            array(
//                                                    'route' => 'fan_general',
//                                                    'action' => 'remove',
//                                                    'id' => $fan->fan_id,                   // $user->getIdentity()
//                                                    'format' => 'smoothbox'
//                                                  ),
//                                                  $this->translate('Undo fan'),
//                                                  array(
//                                                        'class' => 'buttonlink icon_delete smoothbox',
//                                                       ));
                      
                }else{
                    //echo " i  am not. become";
                     echo $this->htmlLink(
                                            array(
                                                    'route' => 'fan_general',
                                                    'action' => 'index',
                                                    'id' => $user->getIdentity(),
                                                    'format' => 'smoothbox'
                                                  ),
                                                  $this->translate(' Become a fan'),
                                                  array(
                                                        'class' => 'buttonlink icon_add smoothbox',
                                                       ));
                }
            ?>
</div>
        </li>
    <?php endforeach; ?>
</ul>
